﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using eProject.Business;

namespace eProject.Web.UI.Admin
{
    public partial class AirPortManagermentEdit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            loadData();
        }
        private void loadData() {
            int id = int.Parse(Request.QueryString["Id"].ToString());
            AirPorts airport = new AirPorts(id);
            //List<AirPorts> airport = AirPorts;
            txtAirportCode.Text = airport.AirPortId.ToString();
            txtAirportName.Text = airport.Name.ToString();
            List<Cities> city = Cities.GetAll();
            ddlCityName.DataSource = city;
            ddlCityName.DataTextField = "Name";
            ddlCityName.DataValueField = "Id";
            ddlCityName.DataBind();
            txtCreatedDate.Text = airport.CreatedDate.ToString();
            txtLastUpdated.Text = airport.LastUpdate.ToString();
        }

    }
}